//package com.wiloon.java.network.network.rpc;
//
///**
// * Created by wiloon on 7/11/17;
// */
//import com.googlecode.jsonrpc4j.JsonRpcClient;
//
//import java.io.IOException;
//import java.io.InputStream;
//import java.io.OutputStream;
//import java.net.*;
//
///**
// * Created by geomantic on 15/8/21.
// */
//public class SocketClient {
//
//    public static void main(String[] args) {
//        try {
//            Socket socket = new Socket("127.0.0.1", 3333);
//            JsonRpcClient client = new JsonRpcClient();
//
//            InputStream ips = socket.getInputStream();
//            OutputStream ops = socket.getOutputStream();
//
//            int reply = client.invokeAndReadResponse("Counter.Add", new Object[]{1001}, int.class, ops, ips);
//
//            System.out.println("reply: " + reply);
//        } catch (IOException e) {
//            e.printStackTrace();
//        } catch (Throwable throwable) {
//            throwable.printStackTrace();
//        }
//
//    }
//}